import { DecodeMessage, useDecodeBufferHook } from './proto';

const protoSrc = 'proto/list/keep_health.proto';

// 解析直播间系统消息
export const useDecodeLiveActionHook = async ({ uint8Array }: DecodeMessage) => {
  if (!uint8Array) return '';
  const typeName = 'list.LiveAction';
  const decodeData = await useDecodeBufferHook({ protoSrc, typeName, uint8Array });
  return decodeData;
};
